package cate.common.table.activity.treasure.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteField;

public class TreasureCallPoolRow extends ERow implements RWItem {
    @NoteField("道具")
    public String reward;

    @NoteField("分组")
    public int groupId;

    @NoteField("权重")
    public int weight;

    @NoteField("是否稀有")
    public boolean rare;

    @Override
    public void parse(XSSFRowWrap xrw) {
        this.id = xrw.getInteger("ID");
        this.reward = xrw.getString("道具");
        this.groupId = xrw.getInteger("分组");
        this.weight = xrw.getInteger("权重");
        this.rare = xrw.getBoolean("是否稀有",false);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
